package dto

import "gitee.com/song-yao-shun/MQH/model"

type FullTCaseDto struct {
	ID 				int 	`json:"id"`
	Name			string	`json:"name"`
	NodeId			int		`json:"node_id"`
	NodeName		string	`json:"node_name"`
	OrderNum		int		`json:"order_num"`
	Priority		string	`json:"priority"`
	Precondition	string	`json:"precondition"`
	TestData		string	`json:"test_data"`
	Procedure		string 	`json:"procedure"`
	ExpectedResult	string	`json:"exp_result"`
	Img 			string 	`json:"img"`
	Desc 			string 	`json:"desc"`
	CreatedAt 		model.Time 	`json:"created_at"`
	UpdatedAt 		model.Time 	`json:"updated_at"`
}

type SampleTCaseDto struct {
	Id 			int 	`json:"id"`
	Name		string	`json:"name"`
}

// 定义转换函数
func ToTCaseDto(fullTCases []FullTCaseDto) (result []SampleTCaseDto){

	for i :=0; i < len(fullTCases); i++{
		res := SampleTCaseDto{
			Id:		fullTCases[i].ID,
			Name: 	fullTCases[i].Name,
		}
		result = append(result, res)
	}
	return
}
